home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 3 / 003.d81 / checkbook bal (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  309 lines

  1. 10 rem checkbook balancer
  2. 20 rem by donna k. woody
  3. 30 :
  4. 40 poke53272,23: rem selects upper/lower case
  5. 50 printchr$(8):rem disables c/shift keys
  6. 60 poke53280,13:rem set border color to light green
  7. 70 poke53281,1:rem set backgroudn color to white
  8. 80 printchr$(30):rem set character color to green
  9. 90 :
  10. 100 rem initial setup
  11. 110 :
  12. 120 gosub2650
  13. 130 :
  14. 140 rem title page & instructions
  15. 150 :
  16. 160 gosub2750
  17. 170 :
  18. 180 rem get balances
  19. 190 :
  20. 200 gosub560
  21. 210 :
  22. 220 rem get outstanding deposits
  23. 230 :
  24. 240 gosub800
  25. 250 :
  26. 260 rem get outstanding checks
  27. 270 :
  28. 280 gosub1080
  29. 290 :
  30. 300 rem get misc charges
  31. 310 :
  32. 320 gosub1340
  33. 330 :
  34. 340 rem print out yes or no
  35. 350 :
  36. 360 gosub1630
  37. 370 :
  38. 380 rem print results
  39. 390 :
  40. 400 gosub1780:rem print to screen
  41. 410 :
  42. 420 rem end or another
  43. 430 :
  44. 440 printchr$(147)
  45. 450 printname$
  46. 460 print"[194]alance another checkbook (y/n)?[160]";
  47. 470 poke204,0:poke207,0:getz$:ifz$=""then470
  48. 480 poke204,1:print
  49. 490 ifz$="y"then 200
  50. 500 ifz$="n"then 520
  51. 510 print"[208]lease enter 'y' or 'n'.[145][145][145][145][145][145][145]":goto460
  52. 520 poke19,0:goto63000
  53. 530 :
  54. 540 rem get balances
  55. 550 :
  56. 560 printchr$(147)
  57. 570 printname$
  58. 580 input"[197]nter date ([205][205]/[196][196]/[217][217]):             [157][157][157][157][157][157][157][157][157][157][157]";date$
  59. 590 iflen(date$)=8then620
  60. 600 print"[201]ncorrect date format. [208]lease re-enter.";
  61. 610 printchr$(19)"":goto580
  62. 620 print"";:printbt$:printchr$(19)""
  63. 630 print"[194]alance from bank statement (00.00):"
  64. 640 poke19,32:input "$            [157][157][157][157][157][157][157][157][157][157][157][157]";z$
  65. 650 bb=val(z$):z$="":print
  66. 660 print"[194]alance from checkbook (00.00):"
  67. 670 input"$            [157][157][157][157][157][157][157][157][157][157][157][157]";z$
  68. 680 cb=val(z$):z$="":print
  69. 690 print:print"[201]s this correct (y/n)?[160]";
  70. 700 poke204,0:poke207,0:getz$:ifz$=""then700
  71. 710 poke204,1:print
  72. 720 ifz$="y"then750
  73. 730 ifz$="n"thenprint"";bt$:printchr$(19)"":goto580
  74. 740 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145][145]";:goto690
  75. 750 printchr$(19)""
  76. 760 return
  77. 770 :
  78. 780 rem get outstanding deposits
  79. 790 :
  80. 800 printchr$(147)
  81. 810 printtab(2);name$
  82. 820 print"[197]nter outstanding deposits (zero to end)"
  83. 830 printtab(7)"[196][207][160][206][207][212][160][197][206][212][197][210][160][195][207][205][205][193][211]!!!!"
  84. 840 forx=1tom1
  85. 850 poke19,32:input"[196]eposit date ([205][205]/[196][196]/[217][217]) :  [160]        [157][157][157][157][157][157][157][157][157]";d$(x):print
  86. 860 ifd$(x)="0"thencd=x-1:x=m1:goto 1030
  87. 870 iflen(d$(x))=8then900
  88. 880 print"[201]ncorrect date format. [208]lease re-enter." ;
  89. 890 printchr$(19)"":goto850
  90. 900 print"";bt$;:printchr$(19)""
  91. 910 input"[196]eposit amount (00.00):   $          [157][157][157][157][157][157][157][157][157][157]";z$
  92. 920 d(x)=val(z$):z$="":print
  93. 930 ifd(x)=0thencd=x-1:x=m1:goto 1030
  94. 940 print"[201]s this correct (y/n)?[160]";
  95. 950 poke204,0:poke207,0:getz$:ifz$=""then950
  96. 960 poke204,1:print
  97. 970 ifz$="y"then1000
  98. 980 ifz$="n"thenprint"";bt$:printchr$(19)"":goto850
  99. 990 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto940
  100. 1000 printchr$(19)""
  101. 1010 do=do+d(x)
  102. 1020 printchr$(19)""
  103. 1030 next
  104. 1040 return
  105. 1050 :
  106. 1060 rem get outstanding checks
  107. 1070 :
  108. 1080 printchr$(147)
  109. 1090 printtab(2);name$
  110. 1100 print" [197]nter outstanding checks (zero to end)"
  111. 1110 printtab(8)"[196][207][160][206][207][212][160][197][206][212][197][210][160][195][207][205][205][193][211]!!!"
  112. 1120 forx=1tom2
  113. 1130 poke19,32:print"[195]heck number:";tab(22);:input"     [157][157][157][157][157]";z$
  114. 1140 ifval(z$)=0thencc=x-1:x=m2:goto1290
  115. 1150 c1$(x)=z$:z$="":print
  116. 1160 iflen(c1$(x))=4then1180
  117. 1170 c1$(x)=pad$+c1$(x):c1$(x)=right$(c1$(x),4):goto1180
  118. 1180 input"[195]heck amount (00.00): $               [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";z$
  119. 1190 ifz$="0"thencc=x-1:x=m2:goto1290
  120. 1200 c(x)=val(z$):z$="":print
  121. 1210 print"[201]s this correct (y/n)? ";
  122. 1220 poke204,0:poke207,0:getz$:ifz$=""then1220
  123. 1230 poke204,1:print
  124. 1240 ifz$="y"then1270
  125. 1250 ifz$="n"thenprint"";bt$:printchr$(19)"":goto1130
  126. 1260 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto1210
  127. 1270 printchr$(19)""
  128. 1280 co=co+c(x)
  129. 1290 next
  130. 1300 return
  131. 1310 :
  132. 1320 rem misc charges
  133. 1330 :
  134. 1340 printchr$(147)
  135. 1350 printtab(2);name$
  136. 1360 print"[197]nter miscellaneous charger (zero ends)"
  137. 1370 printtab(8)"[196][207][160][206][207][212] [213][211][197][160][195][207][205][205][193][211]!!!"
  138. 1380 forx=1to20
  139. 1390 print"[205]isc. charge name (15 characters):"
  140. 1400 poke19,32:input"                    [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";m$(x)
  141. 1410 ifm$(x)="0"thencm=x-1: x=20:goto 1570
  142. 1420 iflen(m$(x))>15thenm$(x)=left$(m$(x),15):goto1450
  143. 1430 iflen(m$(x))<15thenm$(x)=m$(x)+pad$
  144. 1440 m$(x)=left$(m$(x),15)
  145. 1450 print
  146. 1460 print"[205]isc. charge amount (00.00):"
  147. 1470 input"$               [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";z$
  148. 1480 m(x)=val(z$):z$="":print
  149. 1490 ifm(x)=0thencm=x-1:x=20:goto 1570
  150. 1500 print"[201]s this correct (y/n)?[160]";
  151. 1510 poke204,0:poke207,0:getz$:ifz$=""then1510
  152. 1520 poke204,1:print:ifz$="y"then1550
  153. 1530 ifz$="n"thenprint"";bt$:printchr$(19)"":goto1390
  154. 1540 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto1500
  155. 1550 printchr$(19)""
  156. 1560 z$="":mc=mc+m(x)
  157. 1570 print"[145][145][145][145][145][145][145][145][145][145][145][145]"
  158. 1580 next
  159. 1590 return
  160. 1600 :
  161. 1610 rem print out - yes or no
  162. 1620 :
  163. 1630 printchr$(147)
  164. 1640 printtab(2);name$
  165. 1650 print"[196]o you want your balance sheet on:"
  166. 1660 print"   <[211]>creen"
  167. 1670 print"   <[208]>rinter"
  168. 1680 print"[197]nter your choice (s/p): ";
  169. 1690 poke204,0:poke207,0:getz$:ifz$=""then1690
  170. 1700 poke204,1:print
  171. 1710 ifz$="s"thenptr=0:goto1740
  172. 1720 ifz$="p"thenptr=1:goto1740
  173. 1730 print"[208]lease answer 's' or 'p'.[145][145][145][145][145][145][145][145][145][145]":z$="":goto1680
  174. 1740 return
  175. 1750 :
  176. 1760 :rem print to screen
  177. 1770 :
  178. 1780 :printchr$(147)
  179. 1790 printtab(2);name$
  180. 1800 printtab(16)"";date$
  181. 1810 print"[195]heckbook balance -------- $";:x=cb:h1=38:gosub2510:printx2$
  182. 1820 print"[207]utstanding [196]eposits ----- $";:x=do:h1=38:gosub2510:printx2$
  183. 1830 print"[207]utstanding checks ------- $";:x=co:h1=38:gosub2510:printx2$
  184. 1840 print"[205]iscellaneous charges ---- $";:x=mc:h1=38:gosub2510:printx2$
  185. 1850 printtab(27)"------------"
  186. 1860 tt=cb-do+co-mc
  187. 1870 print"[195]urrent balance ---------- $";:x=tt:h1=38:gosub2510:printx2$
  188. 1880 print"[194]ank statement balance --- $";:x=bb:h1=38:gosub2510:printx2$
  189. 1890 printtab(27)"------------"
  190. 1900 print"[196]ifference --------------- $";:df=tt-bb:x=df:h1=38:gosub2510:printx2$
  191. 1910 iftt=bbthenprint"[199]reat!  [217]ou balance with the bank!":goto1940
  192. 1920 ifdf<>0thenprint"[211]orry, you don't balance with the bank."
  193. 1930 ifdf/9=int(df/9)thenprint:print"[217]ou may have transposed a figure."
  194. 1940 print"[196]o you want a printout (y/n)?[160]";
  195. 1950 poke204,0:poke207,0:getz$:ifz$=""then1950
  196. 1960 ifz$="y"thenptr=1:gosub2030:goto1990
  197. 1970 ifz$="n"then1990
  198. 1980 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145][145][145][145][145]":goto1940
  199. 1990 return
  200. 2000 :
  201. 2010 rem print to printer
  202. 2020 :
  203. 2030 printchr$(147)
  204. 2040 print"[208]lease turn your printer on."
  205. 2050 print"[208]ress space bar when ready.";
  206. 2060 poke204,0:poke207,0:getz$:ifz$=""then2060
  207. 2070 open4,4,7:cmd4
  208. 2080 print:print
  209. 2090 printspc(2);name$
  210. 2100 print:printspc(20);date$:print:print
  211. 2110 print"[195]heckbook [194]alance ----------------- $";:x=bb:h1=9:gosub2510:printx2$
  212. 2120 print:print"[207]utstanding [196]eposits:"
  213. 2130 print:printspc(5)"[196]ate";spc(19)"[193]mount"
  214. 2140 forj=1tocd
  215. 2150 printspc(3)d$(j);spc(14)"$";:x=d(j):h1=9:gosub2510:printx2$
  216. 2160 next
  217. 2170 printspc(26)"----------"
  218. 2180 print:pri